package com.jwell.driverapp.retrofit

import com.google.gson.JsonObject
import com.jwell.panprovider.model.*


import io.reactivex.Flowable
import okhttp3.MultipartBody
import retrofit2.http.Body
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part

/**
 * 地址
 */
interface ApiStore {
    //上传图片
    @Multipart
    @POST("api/Upload/Process")
    fun upLoadPic(@Part file: MultipartBody.Part): Flowable<JsonObject>

    //登录
    @POST("api/AdminAccount/Login")
    fun login(@Body parameter: LoginModel.RequestData): Flowable<JsonObject>

    //电子磅单查询
    @POST("/api/services/app/queuingSystems/GetElectronicListPageSupplier")
    fun getElectronicListPag(@Body parameter: ElectronicPoundModel.RequestData): Flowable<JsonObject>

    //预登记
    @POST("api/services/app/queuingSystems/CreateFroExportWaybill")
    fun createFroExportWaybill(@Body parameter: PreRegisterModel.RequestData): Flowable<JsonObject>

    //创建预登记验收计划
    @POST("api/services/app/queuingSystems/CreateFuelPlan")
    fun createFuelPlan(@Body parameter: PreRegisterPlaneModel.RequestData): Flowable<JsonObject>

    //获取产品查询
    @POST("api/services/app/queuingSystems/AppGetProList")
    fun appGetProList(@Body parameter: Map<String, String?>): Flowable<JsonObject>


    //收发货单位
    @POST("api/services/app/queuingSystems/AppGetUnitInformationList")
    fun appGetUnitInformationList(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //司机搜索
    @POST("api/services/app/queuingSystems/GetDriverList")
    fun getDriverList(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //卸料确认，二维码扫描后调用
    @POST("api/services/app/queuingSystems/Unloading")
    fun unloading(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //根据品名查询合同信息
    @POST("api/services/app/queuingSystems/GetContractListByProName")
    fun getContractListByProName(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //预登记验收计划选择合同号
    @POST("api/services/app/queuingSystems/GetContractList")
    fun getContractList(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //运输计划列表-供应商app
    @POST("api/services/app/queuingSystems/AppGetFuelPlanPage")
    fun appGetFuelPlanPage(@Body parameter: TransportPlaneModel.RequestData): Flowable<JsonObject>

    //运单详情-供应商app
    @POST("api/services/app/queuingSystems/GetForExportWaybillById")
    fun getForExportWaybillById(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //撤销运单
    @POST("api/services/app/queuingSystems/RevokeWaybill")
    fun revokeWaybill(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //申请延期
    @POST("api/services/app/queuingSystems/ApplyDelay")
    fun applyDelay(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //供应详情
    @POST("api/services/app/queuingSystems/AppGetFuelDetailById")
    fun supplierGetFuelPlanById(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //计划详情-运单分页
    @POST("api/services/app/queuingSystems/GetPlanDetailWaybillPage")
    fun getPlanDetailWaybillPage(@Body parameter: WaybillModel.RequestData): Flowable<JsonObject>


    //供应商预登记
    @POST("api/services/app/queuingSystems/AppSupplyRegistration")
    fun appSupplyRegistration(@Body parameter: ProviderRegisterModel.RequestData): Flowable<JsonObject>

    //供应登记详情
    @POST("api/services/app/queuingSystems/AppGetContractDetail")
    fun appGetContractDetail(@Body parameter: ProviderRegisterModel.Detail): Flowable<JsonObject>

    //供应修改预计预登记车数-供应商APP
    @POST("api/services/app/queuingSystems/AppUpdateEstimate")
    fun appUpdateEstimate(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //验证车牌号
    @POST("api/services/app/queuingSystems/CheckCarNum")
    fun checkCarNum(@Body parameter: Map<String, String>): Flowable<JsonObject>

    //验证驾驶员是否存在，根据手机号验证
    @POST("api/services/app/queuingSystems/CheckDriverPhone")
    fun checkDriverPhone(@Body parameter: Map<String, String>): Flowable<JsonObject>


    //重置密码发送短信验证码
    @POST("api/services/app/queuingSystems/RegSendMsg")
    fun regSendMsg(@Body parameter: ForgetPasswordModel.RegSendMsg): Flowable<JsonObject>

    //用户重置密码
    @POST("api/services/app/queuingSystems/UserRegPwd")
    fun userRegPwd(@Body parameter: ForgetPasswordModel.UserRegPwd): Flowable<JsonObject>

    //供应商查询运单分页数据
    @POST("api/services/app/queuingSystems/SupplierGetForExportWaybillPage")
    fun supplierGetForExportWaybillPage(@Body parameter: WaybillListModel.RequestData): Flowable<JsonObject>

    //获取所有计量点
    @POST("api/services/app/queuingSystems/GetMeasurePlaceList")
    fun getMeasurePlaceList(): Flowable<JsonObject>

    //获取手机验证码
    @POST("api/AdminAccount/LoginByPhoneCode")
    fun loginByPhoneCode(@Body parameter: LoginModel.RequestLoginByPhone): Flowable<JsonObject>

    //获取手机验证码
    @POST("api/services/app/queuingSystems/SendMsgCode")
    fun sendMsgCode(@Body parameter: LoginModel.RequestSendMsg): Flowable<JsonObject>

}
